FreeUnits()

General System Function

Syntax samples

FREEUNITS(<location> or <resource>)

USE (FREEUNITS(Res1)) Res1 FOR 5 min

Description

Returns the free units of a location or resource.

Valid In

Any logic and any field except those fields evaluated only at translation time. For a list of fields evaluated only at translation time, see the Appendix A.

Components

<location>

The name of the location to examine.

<resource>

The name of the resource to examine.

Example

This example uses FREEUNITS() to assign a team of Specialists to rework a problem. The size of the team, stored in the local variable T_Size, is determined by all the free Specialist units. Team_Time is a table function that varies the amount of time it takes to solve a problem (the amount of time in the USE statement) based on the number of units on the team.

Process Table

Entity

Location

Operation (min)

Problem

Rework

INT T_Size = FREUNITS(Specialist)

IF T_Size = 0 THEN T_Size = 1

USE T_Size Specialist FOR Team_Time(T_Size) Hr

Routing Table

Blk

Output

Destination

Rule

Move Logic

 

 

 

 

 

See Also

UNITS(), RES(), and LOC().